package com.be.beadmin.service.entity;

import com.be.beadmin.common.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 基本的流水码实体
 */

@Entity
@Getter
@Setter
@Table(name="T_SERIAL_NUMBER")
public class SerialNumber extends BaseEntity {
    /**
     * 流水号编码
     */
    @Column(name = "CODE",columnDefinition = "VARCHAR(50) COMMENT '编码' ")
    private String code;

    /**
     * 名称
     */
    @Column(name = "NAME",columnDefinition = "VARCHAR(50) COMMENT '编码' ")
    private String name;

    /**
     * 编码位数
     */
    @Column(name = "CODE_CNT",columnDefinition = "INT COMMENT '编码位数' ")
    private Integer codeCnt;

    /**
     * 链接字符串
     */
    @Column(name = "LINK_SYMBOL",columnDefinition = "VARCHAR(50) COMMENT '编码' ")
    private String linkSymbol;

    /**
     * 上次保存的流水码
     */
    @Column(name = "PRE_RULE_VALUE",columnDefinition = "VARCHAR(200) COMMENT '编码' ")
    private String preRuleValue;

    /**
     * 存到数据里面的最大值
     */
    private Integer maxNumber = 0;
    /**
     * 是否可见 0 可见 1 不可见
     */
    @Column(name = "invisible",columnDefinition = "decimal(1) default 0 COMMENT '是否可见'")
    private int invisible = 0;

}
